package mysql

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Mobile   string `gorm:"type:varchar(20);not null;comment:手机号"`
	Password string `gorm:"type:varchar(36);not null;comment:密码"`
}

func (u User) ShowUserByMobile(mobile string) (result *User, err error) {
	err = DB.Where("mobile = ?", mobile).First(&result).Error
	return
}
